<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app" num=123>
        {{msg}}
    </div>
</body>

</html>
<script src="https://unpkg.com/vue@next"></script>
<script>
    let app = Vue.createApp({
        data() {
            return {
                msg: "vue3"
            }
        },
        beforeUnmount() {
            console.log('即将卸载')
        },
        unmounted() {
            console.log('卸载完成')
        }
    })
    app.mount('#app')

    console.dir(document.querySelector('#app'))

</script>